import { ApiProperty } from '@nestjs/swagger';
import { IsString, IsOptional, IsNumber, IsBoolean, IsArray } from 'class-validator';

export class UpdateUserDto {
  @ApiProperty({ description: '用户名', required: false })
  @IsString()
  @IsOptional()
  username?: string;

  @ApiProperty({ description: '昵称', required: false })
  @IsString()
  @IsOptional()
  nickname?: string;

  @ApiProperty({ description: '密码', required: false })
  @IsString()
  @IsOptional()
  password?: string;

  @ApiProperty({ description: '部门ID', required: false })
  @IsOptional()
  dept_id?: number;

  @ApiProperty({ description: '头像', required: false })
  @IsString()
  @IsOptional()
  avatar?: string;

  @ApiProperty({ description: '手机号', required: false })
  @IsString()
  @IsOptional()
  mobile?: string;

  @ApiProperty({ description: '邮箱', required: false })
  @IsString()
  @IsOptional()
  email?: string;

  @ApiProperty({ description: '状态', required: false })
  @IsBoolean()
  @IsOptional()
  status?: boolean;

  @ApiProperty({ description: '角色ID列表', required: false, type: [Number] })
  @IsArray()
  @IsOptional()
  roleIds?: number[];
}